<div class="tableform">
<form method="post" id='newstore-edit-form' action="index.php?app=apiactionlog&ctl=system_store&act=edit&" method="post">
      <input type=hidden name='id' value='<{$id}>'
    <div class="division" style="border:none;">
      <table class="forform" width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>  
          <th><{t}>门店名：<{/t}></th>
          <td><{input type="text" name="store_name" vtype="required"}></td>
        </tr>
      </table>
    </div>
    <div class="table-action"><{button type="submit" label=$___b2c="保存"|t:'b2c' id='newmember-edit-form-submit1'}></div>
</form>  
<div>
<script>
    (function(){
        var _form = $('newstore-edit-form');
        var btn =$('newmember-edit-form-submit1');
        var finder = finderGroup['<{$env.get.finder_id}>'];

        _form.store('target',{
            onComplete:function(){            

            },
            onSuccess:function(response){
                var hash_res_obj = JSON.decode(response);
                if (hash_res_obj.success != undefined && hash_res_obj.success != "")
                {
                    try{
                        var _dialogIns = btn.getParent('.dialog').retrieve('instance');
                    }catch(e){}

                    if(_dialogIns)
                    {
                        _dialogIns.close();
                        finder.refresh.delay(400,finder);
                    }
                }
                else
                {
                    //alert(hash_res_obj.error);
                }            
            }
        });

        btn.addEvent('click',function(){
            _form.fireEvent('submit',{stop:$empty});



        });

    })();
</script>
